<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;
use App\Model\AdminLogsModel;
use App\Model\AdminRolesModel;
use App\Model\AdminRoleUserModel;

//实名认证审核表
class AuthModel extends Model
{
	//定义一个表名
	protected $table = 'user_auth';
	//定义主键
	protected $primaryKey = 'id';
	protected $guarded = [];

	function getStateNameAttribute($value)
	{
		$state = ['1'=>'审核通过','2'=>'审核驳回','3'=>'待审核'];
		$auth_state =  AuthModel::where('id', $this->id)->value('state');
		return $state[$auth_state];
	}


}